<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core">

<h:head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>Banco de Compartilhamento de Conhecimento- Stefanini</title>
	
	<link rel="stylesheet" type="text/css" href="#{facesContext.externalContext.requestContextPath}/static/css/theme.css" media="screen" /> 
	
</h:head>
	<h:body>
	<div align="center">
	 <p:growl id="messages" autoUpdate="true" />
		<p:layout style="min-width:1020px;max-width:1020px;min-height:1000px">
			<p:layoutUnit position="north" size="220" rendered="false">
				<div id="topo">
					<a href="#{facesContext.externalContext.request.contextPath}/dinamic/pages/principal/index.jsf">
					<h:graphicImage width="1000" height="200" url="/static/imagens/stefanini.jpg" rendered="true"  />
					</a>	
				</div>
		</p:layoutUnit>
			
		<p:layoutUnit  position="center"  >			
				<h:form>
					<p:menubar >
						<p:menuitem value="Home" icon="ui-icon-home" url="/dinamic/pages/principal/index.jsf" />
						<p:menuitem value="Base de Conhecimento" icon="ui-icon-comment" url="/dinamic/pages/manterPostagem/listaTopicos.jsf"/>
						<p:menuitem value="Consulta Banco" icon="ui-icon-star" url="/dinamic/pages/principal/teste.jsf" />
						
						<f:facet name="options">
								<p:inputText style="margin-right:10px" />
								<p:commandButton type="button" value="Pesquisar" icon="ui-icon-search"  />
							</f:facet>
					
				</p:menubar>	
					<p:menubar rendered="#{empty usuarioSessaoManagedBean.dadosSessao.nome}">	
						<p:menuitem value="Registre-se" icon="ui-icon-pencil" url="/dinamic/pages/manterUsuario/registro.jsf" />
						<f:facet name="options">  
							<p:outputLabel styleClass="name"  value="Já é cadastrado?" />
							<p:outputLabel value="Email: " />
           					 <p:inputText  size="20" id="email" required="true" value="#{usuarioManagedBean.usuario.email}" requiredMessage="Informe o E-mail !"/> 
           					 <p:outputLabel value="Senha: " />
           					 <p:password size="20" id="senha" required="true" value="#{usuarioManagedBean.usuario.senha}" requiredMessage="Informe a senha !"/>  
            				  <p:commandButton value="Login" action="#{usuarioManagedBean.logar()}" ajax="false" icon="ui-icon-check" />
        				</f:facet> 
					
					
					</p:menubar>
					
					<p:menubar rendered="#{not empty usuarioSessaoManagedBean.dadosSessao.nome}">
						<p:menuitem styleClass="name" value="Meus dados"/>
						<p:menuitem styleClass="name" value="Minhas Mensagens"/>
						<f:facet name="options">
						<p:outputLabel styleClass="name" value="Bem vindo, #{usuarioSessaoManagedBean.dadosSessao.nome}"/>
						</f:facet>
						<f:facet name="options">
						<p:commandButton value="Logout" action="#{usuarioManagedBean.deslogar()}" ajax="false" icon="ui-icon-close" />
						</f:facet>						
						
					</p:menubar>
					
				</h:form>
				<ui:insert name="conteudo">
                       
                </ui:insert>
		</p:layoutUnit>


		</p:layout>
	</div>
</h:body>
</html>